package com.mali.malibackendproduct.config;

import com.mali.backendcommon.rpc.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDateTime;

@Configuration
@EnableScheduling
public class SaticScheduleTask {

    @Autowired
    private ProductService productService;

    @Scheduled(cron = "0 0 0 * * ?")
    private void configureTasks() {

        productService.productOnAndDownLine();

    }
}